package com.hyq.prototype.demo2;

import java.util.ArrayList;
import java.util.List;

/**
* @ClassName: ShallowCopyMail 
* @Description: 浅拷贝对象邮件对象实例 
* @author Janus
 */
public class ShallowCopyMail implements Cloneable {
	//定义私有集合进行验证
	private List<String> list = new ArrayList<String>();
	//“拷贝”方法
	@Override
	protected ShallowCopyMail clone() {
		ShallowCopyMail mail=null;
		try {
			mail =(ShallowCopyMail)super.clone();
		} catch (Exception e) {
			// TODO: handle exception
		}
		return mail;
	}
	//设置集合值
	public void setListValule(String name){
		this.list.add(name);
	}
	//获取值
	public List<String> getListValue(){
		return this.list;
	}
	
}
